import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
 * 机器号基础表分页查询
 * @param {查询条件} data
 */
export function listPmBaseMachine(query) {
  return request({
    url: 'Buss/PmBaseMachine/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增机器号基础表
 * @param data
 */
export function addPmBaseMachine(data) {
  return request({
    url: 'Buss/PmBaseMachine',
    method: 'post',
    data: data,
  })
}
/**
 * 修改机器号基础表
 * @param data
 */
export function updatePmBaseMachine(data) {
  return request({
    url: 'Buss/PmBaseMachine',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取机器号基础表详情
 * @param {Id}
 */
export function getPmBaseMachine(id) {
  return request({
    url: 'Buss/PmBaseMachine/' + id,
    method: 'get'
  })
}

/**
 * 删除机器号基础表
 * @param {主键} pid
 */
export function delPmBaseMachine(pid) {
  return request({
    url: 'Buss/PmBaseMachine/delete/' + pid,
    method: 'POST'
  })
}
// 导出机器号基础表
export async function exportPmBaseMachine(query) {
  await downFile('Buss/PmBaseMachine/export', { ...query })
}
